package com.baichang.taoshunda.service;

import com.baichang.framework.excelption.ServiceException;
import com.baichang.framework.model.Page;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created by Administrator on 2017/8/28 0028.
 */
public interface WaiterlistService {


    /**
     * 查询本地服务商家
     *  @param businessName
     * @param typeId
     * @param address
     * @param userId
     * @param nowPage
     * @param pageSize   @return
     * */
    List<Map<String, Object>> queryWaiterBusinessList(String businessName, Integer typeId, String address, Integer userId, int nowPage, int pageSize);
    /**
     * 添加本地服务商家
     * @param waiterName
     * @param waiterType
     * @param waiterAddress
     * @param star
     * @param price
     * @param listPic
     * @param picture
     * @param cityId
     * @param provincesId
     * @param regionId
     * @param lat
     * @param lng
     * @param userId
     * @param personalPic
     * @param businessPic
     * @param ifPayment
     * @param money
     * @param phone
     * @param name                                                                                  */
    Map<String, Object> addWaiterBusiness(String waiterName, Integer waiterType, String waiterAddress, Integer star, BigDecimal price, String listPic, String picture, String remark, Integer cityId, Integer provincesId, Integer regionId, String lat, String lng, Integer userId, String personalPic, String businessPic, Integer ifPayment, BigDecimal money, String phone, String name) throws ServiceException;

//    /**
//     * 修改本地服务商家
//     * @param id
//     * @param waiterName
//     * @param waiterType
//     * @param waiterAddress
//     * @param star
//     * @param price
//     * @param listPic
//     * @param picture
//     * @param remark
//     * @param cityId
//     *@param provincesId
//     * @param regionId @return
//     */
//    int updateWaiterBusiness(Integer id, String waiterName, Integer waiterType, String waiterAddress, Integer star, BigDecimal price, String listPic, String picture, String remark, Integer cityId, Integer provincesId, Integer regionId) throws ServiceException;

    /**
     * 删除
     * @param id
     * @param state
     * @return
     */
    int updateWaiterStatus(Integer id, Integer state);

    /**
     * 查询全部商家 ， 用于地图的展示 。 返回经纬度  ， 地址  ， 名称
     *
     * @return
     */
    List<Map<String, Object>> findAllCompanyAtlas(int cityid, String key) throws ServiceException;

    /**
     * 查询商家详情
     * @param id
     * @return
     */
    Map<String, Object> queryWaiterDetails(Integer id);

    /**
     * 删除
     * @param id
     * @return
     */
    boolean deleteWaiter(Integer id);

    /**
     *
     * 修改服务商家
     * @param id
     * @param waiterName
     * @param waiterType
     * @param waiterAddress
     * @param price
     * @param cityId
     * @param provincesId
     * @param regionId
     * @param listPic
     * @param picture
     * @param remark
     * @param lat
     * @param lng
     * @param userId
     * @param personalPic
     * @param businessPic
     * @param ifPayment
     * @param money
     * @param payType
     * @param phone
     * @param name
     * @return
     */
    boolean updateWaiterService(Integer id, String waiterName, Integer waiterType, String waiterAddress, BigDecimal price, Integer cityId, Integer provincesId, Integer regionId, String listPic, String picture, String remark, String lat, String lng, Integer userId, String personalPic, String businessPic, Integer ifPayment, BigDecimal money, Integer payType, String phone, String name);

    /**
     *服务商家支付
     * @param id
     * @param userId
     * @param payType
     * @param money  @return
     */
    Map<String,Object> payMentMoney(Integer id, Integer userId, Integer payType, BigDecimal money);

    /**
     *
     * @param id
     * @param userId
     * @param payType
     * @param money
     * @param ifPayment
     * @return
     */
    boolean updatePaymentMoney(Integer id, Integer userId, Integer payType, BigDecimal money, Integer ifPayment);

    /**
     *
     *
     * @param waiterName
     * @param nowPage
     * @param pageSize
     * @return
     */
    Page queryAuditingBus(String waiterName, int nowPage, int pageSize);

    /**
     *
     *
     * @param waiterName
     * @param address
     *@param typeId
     * @param nowPage
     * @param pageSize   @return
     */
    Page queryWaiterBusiness(String waiterName, String address, Integer typeId, int nowPage, int pageSize);

    /**
     *
     * @param id
     * @param payTime
     * @param starWaiter
     * @return
     */
    int throughService(Integer id, Integer payTime, Integer starWaiter);

    /**
     *
     * @param id
     * @param waiterName
     * @param waiterType
     * @param price
     * @param listPic
     * @param picture
     * @param remark
     * @param star
     * @return
     */
    boolean update(Integer id, String waiterName, Integer waiterType, BigDecimal price, String listPic, String picture, String remark, Integer star);

    /**
     *缴费失败调用
     * @param id
     * @return
     */
    boolean failPaymentMoney(Integer id);

    /**
     *
     * @param id
     * @param status
     * @return
     */
    int updateStatus(Integer id, Integer status);
}
